// 本模块用来调用首页接口与相关逻辑处理
import axios from 'axios';
export default {
	news (data) {
		return axios({
			url: 'api/news',
			method: 'get',
			params: {
				per_page: data.per_page,
                page: data.page,
				category_id:data.category_id,
			}
		})
    },
	newsCategory () {
		return axios({
			url: 'api/news-category',
			method: 'get',
			params:{}
		})
    },
	newsDetails (id) {
		return axios({
			url: 'api/news/'+id,
			method: 'get',
			params:{}
		})
    },
}
